Ext.define('Zm.view.tour.List',{
    alias:'widget.tourlist',
    extend:'Ext.grid.Panel',
    requires:['Ext.toolbar.Toolbar'],
    store:'Tour',
    initComponent:function(){
        var me = this,
            lang = Zm.i18n.Lang;
            
        Ext.apply(me,{
            title: lang.tTourEdit,
            iconCls:'tourlist',
            layout:'fit',
            columns:[
                {text:'ID',dataIndex:'tid'},
                {text:lang.tTourName,dataIndex:'tourname'},
                {text:lang.tMemo,dataIndex:'memo',flex:1}
            ],
            dockedItems:[{
                xtype:'toolbar',
                items:[{
                    text:lang.tAdd,
                    iconCls:'touradd',
                    action:'add'  
                },{
                    text:lang.tDel,
                    iconCls:'tourdel',
                    action:'del'
                },{
                    text:lang.tEdit,
                    iconCls:'touredit',
                    action:'edit'
                }]
            },{
                xtype: 'pagingtoolbar',
                store: me.store,
                dock: 'bottom',
                displayInfo: true                    
            }],
            listeners:{
                activate:{
                    fn:function(){
                        me.store.load();
                    },
                    single:true
                }
            }                            
        });
        me.callParent(arguments);
    }
});